﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DemandList.aspx.cs" Inherits="ITOMMS.Web.Demand.DemandList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>需求列表</title>
    <link href="../css/AspNetPager.css" rel="stylesheet" type="text/css" />
    <link href="../css/layout.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" id='skin' type="text/css" href="../css/skin/qq/ymPrompt.css" />

    <script type="text/javascript" src="../js/ymPrompt.js"></script>

</head>
<body>
    <form id="form1" runat="server">
            <table class="tblDataArea" width="100%">
                <tr class="tblQueryArea">
                    <td class="tblDataCaption" colspan="8">
                        <div style="width: 210px;" class="title">
                            <img src="../images/lv3.gif" style="margin-bottom: -3px;" />需求列表</div>
                </tr>
                <tr>
                    <td class="tdQueryCaption">
                        &nbsp;物品类别：</td>
                    <td class="tdQueryField">
                        <asp:DropDownList ID="ddlAssetClass" runat="server" class="input_out" onblur="this.className='input_off';this.onmouseout=function(){this.className='input_out'};"
                            onfocus="this.className='input_on';this.onmouseout=''" onmousemove="this.className='input_move'"
                            onmouseout="this.className='input_out'" Width="168px">
                        </asp:DropDownList></td>
                    <td class="tdQueryCaption">
                        物品名称：</td>
                    <td class="tdQueryField">
                        <asp:TextBox ID="txtAssetName" runat="server" class="input_out" onfocus="this.className='input_on';this.onmouseout=''"
                            onblur="this.className='input_off';this.onmouseout=function(){this.className='input_out'};"
                            onmousemove="this.className='input_move'" onmouseout="this.className='input_out'"></asp:TextBox></td>
                    <td class="tdQueryField">
                        <asp:Button ID="btnQuery" runat="server" CssClass="cssUICommandButton" OnClick="btnQuery_Click"
                            Text="查询" /></td>
                </tr>
            </table>
            <table class="tblDataArea" width="100%">
                <tr>
                    <td class="tdQueryCaption" colspan="7" style="height: 348px; vertical-align: top;">
                        <asp:GridView ID="dgdaoim_sus_plyedr" Width="100%" runat="server" PageSize="25" AllowSorting="True"
                            HorizontalAlign="Center" AllowPaging="False" AutoGenerateColumns="False" CssClass="cssDataGrid" OnRowCommand="dgdaoim_sus_plyedr_RowCommand">
                            <FooterStyle CssClass="cssDataGridFooter"></FooterStyle>
                            <SelectedRowStyle CssClass="cssDataGridSelectedItem"></SelectedRowStyle>
                            <EditRowStyle CssClass="cssDataGridEditItem"></EditRowStyle>
                            <AlternatingRowStyle CssClass="cssDataGridAlternatingItem"></AlternatingRowStyle>
                            <RowStyle CssClass="cssDataGridItem"></RowStyle>
                            <HeaderStyle ForeColor="#CCFFFF" CssClass="cssDataGridHeader"></HeaderStyle>
                            <Columns>
                                <asp:BoundField DataField="SEQNO" HeaderText="序号" />
                                   <asp:TemplateField HeaderText="物品类别">                              
                                    <ItemTemplate>
                                        <asp:Label ID="lblClassName" runat="server"><%# Enum.GetName(typeof(ITOMMS.Business.PubEnums.AssetType), int.Parse(Eval("ID").ToString()))%></asp:Label>
                                    </ItemTemplate>
                                 </asp:TemplateField>  
                                 
                                 <asp:TemplateField HeaderText="物品名称">                              
                                    <ItemTemplate>
                                        <asp:Label ID="Label1" runat="server"><%# Watson.Core.Tools.FormatValue.InterceptString(Eval("AssetName").ToString(), 10)%></asp:Label>
                                    </ItemTemplate>
                                 </asp:TemplateField>                                
                                
                                <asp:BoundField DataField="AssetNum" HeaderText="数量" />
                                <asp:BoundField DataField="EstimatedPrice"   HeaderText="预计价格" />
                                <asp:BoundField DataField="ExpectTime" DataFormatString="{0:yyyy-MM-dd}" HeaderText="期望采购时间" />
                                <asp:BoundField DataField="DeliveryTime" DataFormatString="{0:yyyy-MM-dd}" HeaderText="期望交付时间" />
                                 <asp:TemplateField HeaderText="状态">                              
                                    <ItemTemplate>
                                        <asp:Label ID="lblClassName" runat="server"><%# Enum.GetName(typeof(ITOMMS.Business.PubEnums.PurchaseState), int.Parse(Eval("PurchaseState").ToString()))%></asp:Label>
                                    </ItemTemplate>
                                 </asp:TemplateField>  
                                <asp:HyperLinkField DataNavigateUrlFields="ID" DataNavigateUrlFormatString="../Procurement/ProcurementAdd.aspx?id={0}&vid={0}"
                                      HeaderText="查看" Text="查看" />
                                <asp:HyperLinkField DataNavigateUrlFields="ID" DataNavigateUrlFormatString="../Procurement/ProcurementAdd.aspx?id={0}"
                                    HeaderText="编辑" Text="编辑" />
                            <asp:TemplateField HeaderText="删除">
                                <ItemTemplate>
                                    <asp:LinkButton ID="lbtnDelete" runat="server" CommandName="del" OnClientClick="javascript:return confirm('你确认要删除吗?');" CommandArgument='<%# DataBinder.Eval(Container.DataItem,"ID")%>'>删除</asp:LinkButton>
                                </ItemTemplate>
                            </asp:TemplateField>
                            </Columns>
                           
                        </asp:GridView>
                    </td>
                </tr>
            </table>
            <div id="AspNetPager">
                <webdiyer:AspNetPager CssClass="paginator" CurrentPageButtonClass="cpb" ID="AspNetPager1"
                    runat="server" FirstPageText="首页" LastPageText="尾页" NextPageText="后页" PrevPageText="前页"
                    OnPageChanged="AspNetPager1_PageChanged" PageSize="25">
                </webdiyer:AspNetPager>
            </div>
    </form>
</body>
</html>
    